package com.easipass.unifiedconfig.core;

import com.easipass.unifiedconfig.UCI;


/**
 * 
 * @version $Id$
 * @author itea
 * @date 2010-1-22
 */
public abstract class Authentication {
	
	protected final String domain;
	public String getDomain() {
		return domain;
	}

	protected final String user;
	
	protected Authentication(String domain, String user) {
		this.domain = domain;
		this.user = user;
	}
	@Override
	public String toString() {
		StringBuilder strb = new StringBuilder("Authentication: ")
			.append(user).append("@").append(domain);
		return strb.toString();
	}
	public abstract boolean authorized(UCI u);
	
	public String getUser() {
		return user;
	}
}
